﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Reflection;
using System.IO;
namespace VPIC_EDIGUI
{
    public partial class Settings : DevExpress.XtraEditors.XtraForm
    {
        DataSet ds;
        public Settings()
        {
            InitializeComponent();

            ds = new System.Data.DataSet();
        }


        private void btnSave_Click(object sender, EventArgs e)
        {

        }

        private void gridControl1_Load(object sender, EventArgs e)
        {
          
            ds.ReadXml(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\DBConfig.xml");
            this.gridControl1.DataSource = ds.Tables[0];
            this.gridControl1.RefreshDataSource();
        }

        private void btnSave_Click_1(object sender, EventArgs e)
        {
            ds.Tables[0].WriteXml(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\DBConfig.xml");
        }
    }
}